<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Administrator</title>
<link rel="shortcut icon" href="<?php echo client_img('favicon.gif');?>" type="image/x-icon">
<link type="text/css" rel="stylesheet" href="<?php echo admin_css("adminbantin.css")?>" />
<script type="text/javascript" src="<?php echo admin_js("jquery-1.4.3.min.js")?>"></script>
<script type="text/javascript" src="<?php echo admin_js("menu.js")?>"></script>
<script type="text/javascript" src="<?php echo admin_js("hoverdiv.js")?>"></script>
<link rel="stylesheet" type="text/css" href="<?php echo admin_js("fancybox/fancybox.css")?>" media="screen" />
<script type="text/javascript" src="<?php echo admin_js("fancybox/fancybox.js")?>"></script>
<script type="text/javascript" src="<?php echo admin_js("common.js")?>"></script>
<script type="text/javascript" src="<?php echo base_url();?>public/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="<?php echo admin_js("cal.js")?>"></script>
<script type="text/javascript">

jQuery(document).ready(function () {
	$('input.two').simpleDatepicker({ startdate: 2000, enddate: 2020 });
});
</script>
<script type="text/javascript">
function load_form_change(url){
  $.ajax({
    url: url,
    type: 'GET',
    error: function(){
      alert('Error !');
    },
    success: function(success)
    {
    	$("#div_change_pass").html(success);
    }
  });
}
function change_pass_ajax(){
  if($('#old_pass').val()==""){ alert("Mật khẩu cũ không được rỗng!"); return;}
  if($('#new_pass').val()==""){ alert("Mật khẩu mới không được rỗng!"); return;}
  if($('#new_pass').val()!=$('#con_pass').val()){ alert("Xác nhận 2 mật khẩu không trùng khớp!"); return;}
  $.ajax({
    url: '<?php echo base_url_admin("user/change")?>',
    type: 'POST',
    data: $('#form_change').serialize(),
    error: function(){
      alert('Error !');
    },
    success: function(success)
    {
		  if(success=="yes"){

    	show_success('div_message',"Đổi mật khẩu thành công!");

		  }else{
			 alert(success);
		  }
    }
  });
}
</script>
</head>

<body>
<div class="header">
	<div id="logo"><a href="javascript:;"><img src="<?php echo admin_img("logo.png")?>" class="png" /></a></div>
  <div id="header_r">
  	<em>Welcome</em> <b><?php echo $_SESSION["login"]["user"];?></b>
    <br />
    <a href="javascript:;" onclick="load_form_change('<?php echo base_url_admin("user/change");?>');document.getElementById('div_change_pass').style.display='block';document.getElementById('fade_change').style.display='block'">Đổi mật khẩu</a>|<a href="<?php echo base_url_admin("logout")?>">Đăng xuất</a>
  </div>
</div>
<!-- form category action -->
<div id="div_change_pass" class="white_content"><!-- Content action ajax --></div>
<div id="fade_change" class="black_overlay"></div>
<!-- end form category action -->